﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DBSourceToolsLib.CodeParser
{
    class BraceBraceNode : BraceNode
    {
        //public override void sendToChain(List<ParseObject> lstParseObjects, List<IResolved> lstResolved)
        //{
        //    //bool bValid = false;

        //    //List<ParseObject> matchedLiteral = base.MatchStartAndEndBrace(lstParseObjects, ParseBrace.BRACE_START, ParseBrace.BRACKET_START);

        //    //ResolvedLiteral oResolveLiteral = new ResolvedLiteral(matchedLiteral);

        //    //lstResolved.Add(oResolveLiteral);


        //    //if (!bValid)
        //    //{ // no match here - send to chain.
        //    //    if (hasChain())
        //    //        sendToChain(lstParseObjects, lstResolved);
        //    //}
        //}





        public override bool interpret()
        {
            while (HasUnresolvedBraces(ParseBrace.BRACE_START, ParseBrace.BRACKET_START))
            {
                MatchNextBrace(ParseBrace.BRACE_START, ParseBrace.BRACKET_START);
            }

            return false;

        }

        //private void MatchNextBrace()
        //{
        //    MatchParms oMatchParms = base.MatchStartAndEndBrace(ParseBrace.BRACE_START, ParseBrace.BRACKET_START);
        //    if (oMatchParms.iFirstLine > -1)
        //    {
        //        ParseBrace oFirstBrace = (ParseBrace)m_SourceFile.ElementAt(oMatchParms.iFirstLine).elementAt(oMatchParms.iFirstIdx);
        //        oFirstBrace.IsResolved = true;
        //    }

        //    if (oMatchParms.iSecondLine > -1)
        //    {
        //        ParseBrace oFirstBrace = (ParseBrace)m_SourceFile.ElementAt(oMatchParms.iSecondLine).elementAt(oMatchParms.iSecondIdx);
        //        oFirstBrace.IsResolved = true;
        //    }
        //}

    }
}
